<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>isPrimitive</title>
</head>

<body>
    <script>
        const isPrimitive = val => Object(val) !== val
        document.write(`null${isPrimitive(null) ? '' : '不'}是原始数据，对象{}${isPrimitive({}) ? '' : '不'}是原始数据`)
    </script>
</body>

</html>